home *** CD-ROM | disk | FTP | other *** search
/ Nightshift Sound & Vision / Nightshift - Sound & Vision.iso / programs / grafik / showvic / formats.doc < prev    next >
Text File  |  1994-10-01  |  5KB  |  164 lines

  1.  
  2.                             C64 PICTURE FORMATS
  3.                             ===================
  4.  
  5.                By Matt Francis (m.p.francis@newcastle.ac.uk)
  6.  
  7.  
  8. INTRODUCTION
  9. ------------
  10.  
  11. Several people have asked me to include information on the different picture
  12. formats with this release of ShowVIC.  Well, information wants to be free,
  13. so here are details of all the formats ShowVIC supports.  The following
  14. labels are used:
  15.  
  16.     Load    - Load address (first two bytes of the file)
  17.     Length    - File length in bytes (including load address bytes)
  18.     Bitmap    - Bitmap offset (8000 bytes)
  19.     Screen    - Screen data offset (1000 bytes)
  20.     Colour    - Colour data offset (1000 bytes)
  21.     ScrCol    - Screen colour offset (1 byte)
  22.  
  23. The offsets given for the bitmap, screen data etc. do not include the two
  24. load address bytes.
  25.  
  26. NOTE:  If you don't know anything about how the C64 stores bitmaps, you will
  27. find it very hard to write a conversion program.  If this is the case, I
  28. recommend you read about bitmaps in a good C64 reference book before
  29. attempting to write a conversion routine.
  30.  
  31.  
  32. THE FORMATS
  33. -----------
  34.  
  35. Art Studio (hires):            Load    - $2000
  36.                     Length    - 9009
  37.                     Bitmap    - 0
  38.                     Screen    - 8000
  39.  
  40.  
  41. Image System (hires):            Load    - $4000
  42.                     Length    - 9194
  43.                     Bitmap    - 0
  44.                     Screen    - 8192
  45.  
  46.  
  47. Blazing Paddles (multicolour):        Load    - $A000
  48.                     Length    - 10242
  49.                     Bitmap    - 0
  50.                     Screen    - 8192
  51.                     Colour    - 9216
  52.                     ScrCol    - 8064
  53.  
  54.  
  55. Koala (multicolour):            Load    - $6000
  56.                     Length    - 10003
  57.                     Bitmap    - 0
  58.                     Screen    - 8000
  59.                     Colour    - 9000
  60.                     ScrCol    - 10000
  61.  
  62.  
  63. Advanced Art Studio (multicolour):    Load    - $2000
  64.                     Length    - 10018
  65.                     Bitmap    - 0
  66.                     Screen    - 8000
  67.                     Colour    - 9016
  68.                     ScrCol    - 9001
  69.  
  70.  
  71. Artist 64 (multicolour):        Load    - $4000
  72.                     Length    - 10242
  73.                     Bitmap    - 0
  74.                     Screen    - 8192
  75.                     Colour    - 9216
  76.                     ScrCol    - 10239
  77.  
  78.  
  79. Vidcom 64 (multicolour):        Load    - $5800
  80.                     Length    - 10050
  81.                     Bitmap    - 2048
  82.                     Screen    - 1024
  83.                     Colour    - 0
  84.                     ScrCol    - 2024 (see note at end)
  85.  
  86.  
  87. Image System (multicolour):        Load    - $3C00
  88.                     Length    - 10218
  89.                     Bitmap    - 1024
  90.                     Screen    - 9216
  91.                     Colour    - 0
  92.                     ScrCol    - 9215
  93.  
  94.  
  95. Doodle (hires):                Load    - $5C00
  96.                     Length    - 9218
  97.                     Bitmap    - 1024
  98.                     Screen    - 0
  99.  
  100.  
  101. FLI (see notes at end):            Load    - $3B00
  102.                     Length    - 17474 or 17666
  103.                     Bitmap    - 9472
  104.                     Screen    - 1280 (8000 bytes)
  105.                     Colour    - 256
  106.                     ScrCol    - 0 (200 bytes)
  107.  
  108.  
  109.  
  110. SPECIAL NOTES ON VIDCOM
  111. -----------------------
  112.  
  113. Unfortunately, Vidcom doesn't seem to store the screen colour in its bitmap
  114. files.  To get round this, ShowVIC takes the screen colour from offset 2024
  115. ($7E8), which is usually a zero (so Vidcom pictures will normally be
  116. converted with a black background, even though Vidcom itself uses dark blue
  117. by default).  This can be changed by loading the picture into a binary file
  118. editor like NewZap or DekSid, and changing byte 2026 (2024+2 for load
  119. address bytes) to a value from 0 to 15.  Of course, you could do this on a
  120. C64 before actually transferring the picture.  The best solution is to avoid
  121. using the Vidcom format - Koala or Advanced Art Studio is preferable.
  122.  
  123. One more thing about Vidcom:  it seems to use exactly the same format for
  124. both hires and multicolour pictures, making it impossible to distinguish
  125. between them.  For this reason, ShowVIC currently assumes all Vidcom
  126. pictures are multicolour.  If many people badger me (can't see it
  127. happening), I might add a switch in a later release, so you can choose which
  128. mode to convert to.
  129.  
  130.  
  131.  
  132. SPECIAL NOTES ON FLI
  133. --------------------
  134.  
  135. For a full description of FLI, I refer you to Pasi Ojala's article in issue
  136. 4 of the "C= Hacking" magazine.  Here are a few notes on implementing the
  137. format.
  138.  
  139. The only difference between converting this format and converting a normal
  140. multicolour bitmap is that (a) the screen colour ($D021) changes every
  141. scanline, and (b) every byte of every character block in the bitmap has its
  142. own byte of screen data.  The screen data is organised in 8 pages of 1000
  143. bytes each.  When an FLI picture is displayed on a C64, the screen RAM page
  144. is changed every scanline, so the first pixel line of bytes (*not* the first
  145. 40 bytes) in the bitmap uses the first 40 bytes from the first page of
  146. screen data.  The second pixel line uses the first 40 bytes from the second
  147. page of screen data, and so on.  Hopefully this example will help clarify
  148. things:
  149.  
  150.  
  151.     Byte in        Char.    Screen        Screen
  152.     bitmap        block    data page    data byte
  153.     -------------------------------------------------
  154.      0         0     0         0
  155.      1         0     1         0
  156.     ...        ...    ...        ...
  157.      7         0     7         0
  158.      8         1     0         1
  159.      9         1     1         1
  160.     ...        ...    ...        ...
  161.      15         1     7         1
  162.      16         2     0         2
  163.     ...        ...    ...        ...
  164.